package org.hoyi.microservice.routes.model;

import java.util.ArrayList;
import java.util.List;

/**
 * 路由器，路由器拥有多个路由规则。
 * @author sam
 *
 */
public class HoyiRouter {

	String UUID;
	
	String ServiceID;
	
	String Host;
	
	String Port;
	
	String Status;
	
	List<HoyiRouteRule> rules;
	
	String notes;

	public String getUUID() {
		return UUID;
	}

	public void setUUID(String uUID) {
		UUID = uUID;
	}

	public String getServiceID() {
		return ServiceID;
	}

	public void setServiceID(String serviceID) {
		ServiceID = serviceID;
	}

	public String getHost() {
		return Host;
	}

	public void setHost(String host) {
		Host = host;
	}

	public String getPort() {
		return Port;
	}

	public void setPort(String port) {
		Port = port;
	}

	public String getStatus() {
		return Status;
	}

	public void setStatus(String status) {
		Status = status;
	}

	public List<HoyiRouteRule> getRules() {
		if (rules == null) {
			rules = new ArrayList<>();
		}
		return rules;
	}

	public void setRules(List<HoyiRouteRule> rules) {
		this.rules = rules;
	}

	public String getNotes() {
		return notes;
	}

	public void setNotes(String notes) {
		this.notes = notes;
	}
	
	public void AddRule(HoyiRouteRule rule) {
		getRules().add(rule);
	}
	
}
